<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <!--        <link lang="css" href="resources/css/jquery/ui-lightness/jquery-ui-1.8.21.custom" />
                <script type="javascript" src="resources/js/jquery/jquery-1.7.2.min.js" />
                <script type="javascript" src="resources/js/jquery/jquery-ui-1.8.21.custom.min.js" />-->
        <h:outputStylesheet library="css/jquery/ui-lightness" name="jquery-ui-1.8.21.custom.css" />
        <h:outputScript library="js/jquery" name="jquery-1.7.2.min.js" />
        <h:outputScript library="js/jquery" name="jquery-ui-1.8.21.custom.min.js" />

        <title>Autocompleting the tags field with jQuery UI autocomplete plugin</title>
        <script language="javascript">
            $(document).ready(function() {
                //$("#jquerifyme").text("I've been jquerified!!!"); ok! jquery's ready!
                $( "[id='autocompleteForm:autocompleteTags']" ).autocomplete({
                        source: "http://localhost:8090/tradeUplan/resources/autocomplete/tags/whatevertagpart",
                        minLength: 2,
                        select: function( event, ui ) {
                                alert("Selected: " + ui.item.value + " aka " + ui.item.id);
                        }
                });
            });            
        </script>
    </h:head>
    <h:body>
        <!--        <div id="jquerifyme"></div>-->
        <h:form id="autocompleteForm">
            <h:inputText id="autocompleteTags" />
        </h:form>
    </h:body>
</html>

